package common

import (
	"github.com/prometheus/client_golang/prometheus/promhttp"
	"github.com/zw2582/ginlib"
	"go.uber.org/zap"
	"net/http"
)

//PrometheusBoot 定义普罗米修斯监控地址
func PrometheusBoot()  {
	go func() {
		http.Handle("/metrics", promhttp.Handler())
		if err := http.ListenAndServe("0.0.0.0:9092", nil); err != nil {
			ginlib.Logger.Error(err.Error(), zap.Error(err))
		}
	}()
}
